home *** CD-ROM | disk | FTP | other *** search
- #include "SAT.h"
-
- /* program SATminimal; */
-
- /* MySprite's interface */
- extern void InitMySprite();
- extern pascal void SetupMySprite (SpritePtr);
- extern pascal void HandleMySprite (SpritePtr);
-
- void main(void)
- {
- SpritePtr ignoreSp;
- long L;
-
- /* ThinkC and MWC don't initialize the toolbox automatically, so we ask SAT to do that. */
- SATInitToolbox();
-
- /* Initialize, using PICTs 128 or 129 as background, Classic-sized drawing area. */
- SATInit(128, 129, 512, 322);
-
- /* Initialize sprite unit(s), by preloading faces and sounds */
- InitMySprite();
-
- /* Make a few sprites */
- ignoreSp = SATNewSprite(0, 50, 50, SetupMySprite);
- ignoreSp = SATNewSprite(0, 100, 100, SetupMySprite);
- ignoreSp = SATNewSprite(0, 125, 120, SetupMySprite);
- ignoreSp = SATNewSprite(0, 150, 140, SetupMySprite);
- ignoreSp = SATNewSprite(0, 200, 180, SetupMySprite);
- ignoreSp = SATNewSprite(0, 250, 200, SetupMySprite);
- ignoreSp = SATNewSprite(0, 300, 250, SetupMySprite);
-
- /* Run until the user clicks the mouse button */
- while (!Button())
- {
- L = TickCount();
- SATRun(true); /* Run the animation */
- while (L > TickCount() - 3L) /* Speed limit to 20 fps*/
- ;
- }
- SATSoundShutup(); /* Always make sure the channel is de-allocated */
- }
-